from .base import Base, engine, SessionLocal
from .session import get_db

__all__ = ["Base", "engine", "SessionLocal", "get_db"]

# 确保所有模型都已导入
from app.models.user import User  # noqa
from app.models.bill import Bill  # noqa

# 初始化表
def init_db():
    Base.metadata.create_all(bind=engine)

# 不要在模块级别直接创建表
# Base.metadata.create_all(bind=engine) 